﻿<form method="get" class="form-horizontal">
	<div class="form-group">
		<label class="col-sm-3 col-sm-offset-1 control-label">关注个数</label>
		<div class="col-sm-7">
			<div><input type="text" id="fenSiNum" class="fenSiNum" name="search1" value="" /></div>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-3 col-sm-offset-1 control-label">翻几页</label>
		<div class="col-sm-7">
			<div><input type="text" id="fanyeNum" class="fanyeNum" name="search1" value="" /></div>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-3 col-sm-offset-1 control-label">等待时间(秒)</label>
		<div class="col-sm-7">
			<div><input type="text" id="waitingTime" class="waitingTime" name="search1" value="" /></div>
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-3 col-sm-offset-1 control-label">是否私信：</label>
		<div style="margin-left: 15px;"  data-toggle="buttons" class="btn-group">
			<label onclick="view_message_(0)"  class="btn btn-sm btn-white active" > <input  type="radio" /> 不发消息 </label>
			<label onclick="view_message_(1)"  class="btn btn-sm btn-white" > <input  type="radio" /> 发消息 </label>
		</div>
	</div>
	<div style="display: none" id="message_show" class="form-group">
		<label class="col-sm-3 col-sm-offset-1 control-label">私信内容：</label>
		<div class="col-sm-7">
			<textarea id="view_message" class="form-control textarea-control" rows="3" placeholder="请输入私信内容" data-emojiable="true" data-emoji-input="unicode"></textarea>
		</div>
	</div>
	<div class="hr-line-dashed"></div>
</form>


<!-- #################################今日头条(搜索文章评论)################################## -->
<script>
    var view_is_message = 0;//是否发消息   0 不  1 发
    function view_message_(type) {
        if ( type == 0 ){
            $("#message_show").hide();
        }else {
            $("#message_show").show();
        }
        view_is_message = type
    }

    function btn_select_manage() {
        var fenSiNum = document.getElementById("fenSiNum").value;
        var sendMessage = document.getElementById("view_message").value;
        var waitingTime = document.getElementById("waitingTime").value;
        var fanyeNum = document.getElementById("fanyeNum").value;
        <!-- var searchResult = search1.split("||"); -->
		if (fenSiNum == "") {
            toastr.warning("关注个数不能为空");
        } else if (fanyeNum == "") {
            toastr.warning("翻页数不能为空");
        } else if (view_is_message == 1 && sendMessage == "" ) {
            toastr.warning("私信内容不能为空");
        } else if (waitingTime == "" ) {
            toastr.warning("等待时间不能为空");
        } else if(!/^[0-9]*$/.test(fenSiNum)){
            toastr.warning("关注个数只能输入数字!");
            return false;
        }else if(!/^[0-9]*$/.test(fanyeNum)){
            toastr.warning("翻页数只能输入数字!");
            return false;
        }else if(!/^[0-9]*$/.test(waitingTime)){
            toastr.warning("等待时间只能输入数字!");
            return false;
        }else {
            var json = { "issixin":view_is_message, "fenSiNum":fenSiNum,"sendMessage":sendMessage,"fanyeNum":fanyeNum,"waitingTime":waitingTime}
            issuedData.setView(JSON.stringify(json));
            $("#select_manage").modal("hide");
            $("#btn_manage").text("抖音(粉丝关注私信plus)插件");
            $("#btn_manage").show();
            $("#btn_manage").prev().show();
            $("#btn_manage").prev().prev().hide();
            Color.success("state_manage");
        }
    }

</script>